package org.fing.edu.uy.esbadp.core.entity;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

import org.fing.edu.uy.esbadp.core.constants.EsbAdpPropertyConstants;


@XmlRootElement(name = EsbAdpPropertyConstants.SERVICES_ROOT_ELEMENT)
@XmlSeeAlso({DMAdpService.class})
public class DMAdpServices implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8259179274179336355L;
	List<DMAdpService> services;
	
	public DMAdpServices(){
		this.services = new LinkedList<DMAdpService>();		
	}

	@XmlElementRef
	public List<DMAdpService> getServices() {
		return services;
	}

	public void setServices(List<DMAdpService> actions) {
		this.services = actions;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Adaptation Services ->\n");
		for(DMAdpService aux : services){
			sb.append(aux.toString());
			sb.append("\n");
		}
		return sb.toString();
	}
	
}
